pub fn odd_fibnacci_sum(threshold: u32) -> u32 {

    let mut a;
    let mut b = 0;
    let mut cur = 1;
    let mut sum = 0;
    while cur < threshold {
        if cur % 2 == 1 {
            sum += cur
        }
        a = b;
        b = cur;
        cur = a + b;
    }
    sum
}
